package lium.lbs.lbsim.adapter

import android.widget.ImageView
import android.widget.TextView
import com.buz.hjcdriver.bean.BankCardListResultBean
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import lium.lbs.lbsim.R
import lium.lbs.lbsim.activity.BankCardListActivity

class BankListAdapter : BaseQuickAdapter<BankCardListResultBean, BaseViewHolder>(R.layout.item_bank){
    override fun convert(helper: BaseViewHolder?, item: BankCardListResultBean?) {
        (mContext as BankCardListActivity).displayImage(item?.icon,R.drawable.icon_bank1,helper?.getView<ImageView>(R.id.icon))
        helper?.getView<TextView>(R.id.name)?.text = item?.name+""
        helper?.getView<TextView>(R.id.cardNum)?.text = item?.cardNum+""

       (mContext as BankCardListActivity).displayImage(item?.color,R.drawable.icon_bank1,helper?.getView<ImageView>(R.id.item_bank_bg))

    }


}